package com.tansun.easycare.rule.ml.algorithm.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 变量请求获取类
 * @author xch
 * @version 2018-08-24
 */
public class DataVariableList {
	
	//输入变量
	protected List<DataVariable> inputVars;
	//忽略变量
	protected List<DataVariable> ignoreVars;
	//目标变量
	protected List<DataVariable> targetVars;
	
	protected String tableName;
	//训练集测试集分割百分比
	protected double dataSplit;
	
	public DataVariableList() {
	}

	public List<DataVariable> getInputVars() {
		return inputVars;
	}

	public void setInputVars(List<DataVariable> inputVars) {
		this.inputVars = inputVars;
	}

	public List<DataVariable> getIgnoreVars() {
		return ignoreVars;
	}

	public void setIgnoreVars(List<DataVariable> ignoreVars) {
		this.ignoreVars = ignoreVars;
	}

	public List<DataVariable> getTargetVars() {
		return targetVars;
	}

	public void setTargetVars(List<DataVariable> targetVars) {
		this.targetVars = targetVars;
	}
	
	public void setTargetVars(DataVariable dataVariable) {
		if (this.targetVars == null){
			this.targetVars = new ArrayList<DataVariable>();
		}
		this.targetVars.add(dataVariable);
	}

	public double getDataSplit() {
		return dataSplit;
	}

	public void setDataSplit(double dataSplit) {
		this.dataSplit = dataSplit;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	@Override
	public String toString() {
		return "DataVariableList [tableName=" + tableName + ", dataSplit=" + dataSplit + "]";
	}
	
}
